#!/bin/sh

#
# Test that metadata is stored correctly
#

. "$(cd "$(dirname "$0")" && pwd)/common.sh"

cat >$CONFIG <<EOF
meta-product = "product name"
meta-description = "product description"
meta-version = "some version"
meta-platform = "a platform"
meta-architecture = "an architecture"
meta-author = "someone"
EOF

cat >$EXPECTED_META_CONF <<EOF
meta-product="product name"
meta-description="product description"
meta-version="some version"
meta-author="someone"
meta-platform="a platform"
meta-architecture="an architecture"
EOF

$FWUP_CREATE -c -f $CONFIG -o $FWFILE

# Check that the zip file was created as expected
check_meta_conf

# Check that the verify logic works on this file
$FWUP_VERIFY -V -i $FWFILE
